{% extends "base.html" %}

{% block resources %}
<script type="text/javascript" src="/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="/js/jquery.cookies.js"></script>
<script type="text/javascript" src="/js/jquery.accordion.js"></script>
<script type="text/javascript" src="/js/item.js"></script>
<script type="text/javascript" src="/js/jquery.ba-serializeobject.min.js"></script>
<script src="/js/jquery.dajax.core.js" type="text/javascript" charset="utf-8"></script>
<script src="/js/json/json_parse.js" type="text/javascript"></script>
<!-- FANCYBOX: Add mousewheel plugin (this is optional) -->
<script type="text/javascript" src="/js/jquery.mousewheel-3.0.6.pack.js"></script>
<!-- FANCYBOX: Add fancyBox main JS and CSS files -->
<script type="text/javascript" src="/js/fancybox/jquery.fancybox.js?v=2.1.3"></script>
<link rel="stylesheet" type="text/css" href="/js/fancybox/jquery.fancybox.css?v=2.1.2" media="screen" />
{% endblock %}

{% block content %}
<div class="grid_6" style="color: #fff; padding-top: 5px;">
	<h1 class="formTitle">Item</h1>
	<table class="tblFormView">
		<tr>
			<td class="tdFieldLabel" width="150px">Name</td>
			<td><input type="text" name="name" readonly value="{{item.name}}" style="width: 280px;" /></td>
		</tr>
		<tr>
			<td class="tdFieldLabel">Kill date</td>
			<td><input type="text" name="kill_date" readonly value="{{item.creation_date}}" style="width: 150px;" /></td>
		</tr>
		<tr>
			<td class="tdFieldLabel">Status</td>
			<td><input type="text" id="status" readonly value="{{item.status}}" /></td>
			
		</tr>
		<tr>
			<td class="tdFieldLabel">Episode</td>
			<td><input type="text" id="episode_name" readonly value="{{item.episode_name}}" /></td>
		</tr>
		<tr>
			<td class="tdFieldLabel">Rating</td>
			<td><input type="text" id="rating" readonly value="{{item.rating}}" /></td>
		</tr>
		<tr>
			<td class="tdFieldLabel">Genres</td>
			<td><input type="text" id="genres" readonly value="{{item.genres}}" style="width: 150px;" /></td>
		</tr>
		<tr>
			<td class="tdFieldLabel">Actors</td>
			<td><input type="text" id="actors" readonly value="{{item.actors}}" style="width: 280px;" /></td>
		</tr>
		<tr>
			<td class="tdFieldLabel">Origin country</td>
			<td><input type="text" id="country_of_origin" readonly value="{{item.country_of_origin}}" style="width: 200px;" /></td>
		</tr>
		<tr>
			<td class="tdFieldLabel">Year</td>
			<td><input type="text" id="year" readonly value="{{item.year}}" /></td>
		</tr>
		<tr>
			<td class="tdFieldLabel">Director</td>
			<td><input type="text" id="director" readonly value="{{item.director}}" style="width: 200px;" /></td>
		</tr>
		<tr>
			<td class="tdFieldLabel">Studio name</td>
			<td><input type="text" id="studio_name" readonly value="{{item.studio_name}}" style="width: 200px;" /></td>
		</tr>
		<tr>
			<td class="tdFieldLabel">Format</td>
			<td><input type="text" id="format" readonly value="{{item.format}}" /></td>
		</tr>
		<tr>
			<td class="tdFieldLabel">MAM id</td>
			<td><input type="text" id="mam_id" readonly value="{{item.mam_id}}" /></td>
		</tr>
	</table>
	<a href="#" class="bttn icon fork" onclick="javascript:actionForceToBeDoneItem();">Force to be Done</a>
	<br /><br />
</div>
<div class="grid_3" style="padding-top: 5px;">
	<table class="tblItemExport">
		<tr><td class="font">Export to:</td></tr>
		<tr>
			<td>
				<select multiple="multiple" class="slctCusFE" name="customers_for_export" id="customers_for_export">
					{% for cfe in customers_for_export %}
					<option value="{{cfe.id}}">{{cfe.name}}</option>
					{% endfor %}
				</select>
			</td>
		</tr>
		<tr><td colspan="2" class="font" style="padding-top: 3px;">Package group:</td></tr>
		<tr>
			<td>
				<select id="package_group" class="slctPkgGrp" style="width: 100%;">
					<option value="null">Please select one...</option>
					{% for pkgg in packages_groups %}
					<option value="{{pkgg.id}}">{{pkgg.name}}</option>
					{% endfor %}
					<option value="new">New...</option>
				</select>
			</td>
		</tr>
		<tr>
			<td class="actbarTd">
				<a href="#" class="bttn icon fork" onclick="javascript:actionExportItem();">Export</a>
				<!-- DAJAXICE: Funciones de ejemplo, por favor no borrar! 
				<input type="button" onclick="dajaxice_example();" value="Get message from server!" />
				<input type="text" id="text" />
				<input type="button" onclick="dajaxice_args_example();" value="Send!" />
				-->
			</td>
		</tr>
	</table>
</div>
<div class="grid_9" id="renditions" style="color: #fff;">
	<h3 class="accordion" id="section1" style="background: #6b6e80; padding-left: 3px;">
		<table class="itemSecTbl">
			<tr>
				<td class="itemSecTitle">
					<a href="#">Video renditions</a><!-- <span></span> -->
				</td>
				<td class="itemSecBtt">
					<a href="#"><img src="/images/icons/magnifier.png" /></a>
				</td>
			</tr>
		</table>
	<h3>
	<div class="container">
		<div class="content">
			<table class="itemVwTbl">
				<thead class="itemVwThead">
					<th>Name</th><th>Video profile</th><th class="center">Status</th>
				</thead>
				<tbody class="itemVwTbody">
			{% for vr in video_renditions %}
			<tr>
				<td><a href="/videos/{{vr.file_name}}">{{vr.file_name}}</a></td>
				<td>{{vr.video_profile}}</td>
				<td><center><span class="vrstatus_{{vr.status}}" /></center></td>
			</tr>
			{% endfor %}
			<tbody>
			</table>
		</div>
	</div>
	<h3 class="accordion" id="section2" style="background: #6b6e80; padding-left: 3px;">
		<table class="itemSecTbl">
			<tr>
				<td class="itemSecTitle">
					<a href="#">Image renditions</a><!-- <span></span> -->
				</td>
				<td class="itemSecBtt">
					<a href="/vod/image_renditions/upload/{{item.id}}" onclick="javascript:actionUploadImageRenditions(event);">
						<img src="/images/icons/image_link.png" />
					</a>
					<a href="#"><img src="/images/icons/magnifier.png" /></a>
				</td>
			</tr>
		</table>
	<h3>
	<div class="container">
		<div class="content">
			<table class="itemVwTbl">
				<thead class="itemVwThead">
					<th>Name</th><th>Image profile</th><th class="center">Status</th>
				</thead>
				<tbody class="itemVwTbody">
			{% for ir in image_renditions %}
			<tr>
				<td><a href="/images_proc/{{ir.file_name}}">{{ir.file_name}}</a></td>
				<td>{{ir.image_profile}}</td>
				<td><center><span class="irstatus_{{ir.status}}" /></center></td>
			</tr>
			{% endfor %}
			<tbody>
			</table>
		</div>
	</div>
</div>
<!-- HIDDEN FIELDS -->
<input type="hidden" id="item_id" value="{{item.id}}" />
<a id="new_package_group" class="various fancybox.iframe" style="visibility: hidden;" href="/vod/package_group/new">New package group</a>
{% endblock %}